<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NeuZephyr: nz::opt::Momentum Class Reference</title>
<link rel="icon" href="NZ_logo2.png" type="image/x-icon" />
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="NZ_logo2.png"/></td>
  <td id="projectalign">
   <div id="projectname">NeuZephyr
   </div>
   <div id="projectbrief">Simple DL Framework</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>nz</b></li><li class="navelem"><a class="el" href="namespacenz_1_1opt.html">opt</a></li><li class="navelem"><a class="el" href="classnz_1_1opt_1_1_momentum.html">Momentum</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classnz_1_1opt_1_1_momentum-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">nz::opt::Momentum Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a> optimizer for deep learning models.  
 <a href="#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for nz::opt::Momentum:</div>
<div class="dyncontent">
<div class="center"><img src="classnz_1_1opt_1_1_momentum__inherit__graph.png" border="0" usemap="#anz_1_1opt_1_1_momentum_inherit__map" alt="Inheritance graph"/></div>
<map name="anz_1_1opt_1_1_momentum_inherit__map" id="anz_1_1opt_1_1_momentum_inherit__map">
<area shape="rect" title="Momentum optimizer for deep learning models." alt="" coords="5,80,140,107"/>
<area shape="rect" href="classnz_1_1opt_1_1_optimizer.html" title="Base class for optimization algorithms in deep learning." alt="" coords="10,5,135,32"/>
<area shape="poly" title=" " alt="" coords="75,48,75,80,70,80,70,48"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for nz::opt::Momentum:</div>
<div class="dyncontent">
<div class="center"><img src="classnz_1_1opt_1_1_momentum__coll__graph.png" border="0" usemap="#anz_1_1opt_1_1_momentum_coll__map" alt="Collaboration graph"/></div>
<map name="anz_1_1opt_1_1_momentum_coll__map" id="anz_1_1opt_1_1_momentum_coll__map">
<area shape="rect" title="Momentum optimizer for deep learning models." alt="" coords="5,80,140,107"/>
<area shape="rect" href="classnz_1_1opt_1_1_optimizer.html" title="Base class for optimization algorithms in deep learning." alt="" coords="10,5,135,32"/>
<area shape="poly" title=" " alt="" coords="75,48,75,80,70,80,70,48"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:accdb15acc2b9f0e2f1fc7dce593c169d" id="r_accdb15acc2b9f0e2f1fc7dce593c169d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#accdb15acc2b9f0e2f1fc7dce593c169d">Momentum</a> (Tensor::value_type learning_rate, Tensor::value_type beta)</td></tr>
<tr class="memdesc:accdb15acc2b9f0e2f1fc7dce593c169d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a> optimizer with a specified learning rate and momentum factor.  <br /></td></tr>
<tr class="separator:accdb15acc2b9f0e2f1fc7dce593c169d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b8d15dc85293840cbd19e27a6bb52a6" id="r_a9b8d15dc85293840cbd19e27a6bb52a6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9b8d15dc85293840cbd19e27a6bb52a6">step</a> (<a class="el" href="classnz_1_1nodes_1_1_node.html">Node</a> *input) override</td></tr>
<tr class="memdesc:a9b8d15dc85293840cbd19e27a6bb52a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a single optimization step using the <a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a> algorithm.  <br /></td></tr>
<tr class="separator:a9b8d15dc85293840cbd19e27a6bb52a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classnz_1_1opt_1_1_optimizer"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_methods_classnz_1_1opt_1_1_optimizer')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classnz_1_1opt_1_1_optimizer.html">nz::opt::Optimizer</a></td></tr>
<tr class="memitem:aaf8d92566a815254dbb0ace9af9cb1ae inherit pub_methods_classnz_1_1opt_1_1_optimizer" id="r_aaf8d92566a815254dbb0ace9af9cb1ae"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnz_1_1opt_1_1_optimizer.html#aaf8d92566a815254dbb0ace9af9cb1ae">Optimizer</a> ()=default</td></tr>
<tr class="memdesc:aaf8d92566a815254dbb0ace9af9cb1ae inherit pub_methods_classnz_1_1opt_1_1_optimizer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor for the <a class="el" href="classnz_1_1opt_1_1_optimizer.html" title="Base class for optimization algorithms in deep learning.">Optimizer</a> class.  <br /></td></tr>
<tr class="separator:aaf8d92566a815254dbb0ace9af9cb1ae inherit pub_methods_classnz_1_1opt_1_1_optimizer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9262983ef3bd11e6f548862b2f58e1d inherit pub_methods_classnz_1_1opt_1_1_optimizer" id="r_ab9262983ef3bd11e6f548862b2f58e1d"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnz_1_1opt_1_1_optimizer.html#ab9262983ef3bd11e6f548862b2f58e1d">~Optimizer</a> ()=default</td></tr>
<tr class="memdesc:ab9262983ef3bd11e6f548862b2f58e1d inherit pub_methods_classnz_1_1opt_1_1_optimizer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor for the <a class="el" href="classnz_1_1opt_1_1_optimizer.html" title="Base class for optimization algorithms in deep learning.">Optimizer</a> class.  <br /></td></tr>
<tr class="separator:ab9262983ef3bd11e6f548862b2f58e1d inherit pub_methods_classnz_1_1opt_1_1_optimizer"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a> optimizer for deep learning models. </p>
<p>The <code><a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a></code> class implements the <a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a> optimization algorithm, which is a variant of the Stochastic Gradient Descent (<a class="el" href="classnz_1_1opt_1_1_s_g_d.html" title="Stochastic Gradient Descent (SGD) optimizer for deep learning models.">SGD</a>). <a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a> helps accelerate <a class="el" href="classnz_1_1opt_1_1_s_g_d.html" title="Stochastic Gradient Descent (SGD) optimizer for deep learning models.">SGD</a> in the relevant direction and dampens oscillations, improving convergence speed and stability. It achieves this by incorporating a velocity term that accumulates a fraction of the previous gradients, which is used to update the model parameters in the direction of the accumulated gradients.</p>
<p>This class extends the <code><a class="el" href="classnz_1_1opt_1_1_optimizer.html" title="Base class for optimization algorithms in deep learning.">Optimizer</a></code> base class and provides a concrete implementation of the <code>step</code> method, which updates the model's parameters (represented as <code>Node</code> objects) using the <a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a> algorithm.</p>
<ul>
<li>The optimizer maintains a <code>velocity</code> map, which tracks the velocity (accumulated gradients) for each model parameter (<code>Node</code>).</li>
<li>The velocity is updated using the formula: [ v_{t+1} = \beta v_t + (1 - \beta) g_t ] where ( v_t ) is the velocity, ( \beta ) is the momentum factor, and ( g_t ) is the current gradient.</li>
<li>The updated velocity is then used to adjust the model parameters using a learning rate, similar to <a class="el" href="classnz_1_1opt_1_1_s_g_d.html" title="Stochastic Gradient Descent (SGD) optimizer for deep learning models.">SGD</a>.</li>
<li>The optimizer uses GPU-accelerated computations through CUDA to efficiently update parameters, making it suitable for large-scale models.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The optimizer assumes that the model parameters are represented by <code>Node</code> objects, and each node must have associated gradients.</li>
<li>The velocity is stored per <code>Node</code> object, and if a <code>Node</code> does not have an existing velocity, it is initialized to a zero tensor.</li>
<li>The optimizer utilizes GPU memory for velocity storage and gradient computation, requiring CUDA support.</li>
<li>Ensure that the model parameters have been properly initialized, and gradients are computed before calling this method.</li>
</ul>
</dd></dl>
<h3><a class="anchor" id="autotoc_md116"></a>
Usage Example:</h3>
<div class="fragment"><div class="line"><a class="code hl_class" href="classnz_1_1opt_1_1_momentum.html">Momentum</a> optimizer(0.01, 0.9);</div>
<div class="line">graph.update(&amp;optimizer); <span class="comment">// Suppose &quot;graph&quot; is a computation graph waiting for gradient updates;</span></div>
<div class="ttc" id="aclassnz_1_1opt_1_1_momentum_html"><div class="ttname"><a href="classnz_1_1opt_1_1_momentum.html">nz::opt::Momentum</a></div><div class="ttdoc">Momentum optimizer for deep learning models.</div><div class="ttdef"><b>Definition</b> <a href="_optimizer_8cuh_source.html#l00352">Optimizer.cuh:352</a></div></div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="classnz_1_1opt_1_1_optimizer.html" title="Base class for optimization algorithms in deep learning.">Optimizer</a> for the base class that defines the interface for all optimizers. </dd>
<dd>
Nodes::Node for the class representing model parameters.</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Mgepahmge (<a href="https://github.com/Mgepahmge">https://github.com/Mgepahmge</a>)</dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024/12/07 </dd></dl>

<p class="definition">Definition at line <a class="el" href="_optimizer_8cuh_source.html#l00352">352</a> of file <a class="el" href="_optimizer_8cuh_source.html">Optimizer.cuh</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="accdb15acc2b9f0e2f1fc7dce593c169d" name="accdb15acc2b9f0e2f1fc7dce593c169d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#accdb15acc2b9f0e2f1fc7dce593c169d">&#9670;&#160;</a></span>Momentum()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nz::opt::Momentum::Momentum </td>
          <td>(</td>
          <td class="paramtype">Tensor::value_type</td>          <td class="paramname"><span class="paramname"><em>learning_rate</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Tensor::value_type</td>          <td class="paramname"><span class="paramname"><em>beta</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs a <a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a> optimizer with a specified learning rate and momentum factor. </p>
<p>This constructor initializes a <code><a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a></code> optimizer with a given learning rate and momentum factor. The learning rate controls the step size in the gradient descent update, while the momentum factor helps accelerate the optimizer by incorporating previous gradients.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">learning_rate</td><td>The learning rate for the optimizer, which determines the step size for parameter updates. </td></tr>
    <tr><td class="paramname">beta</td><td>The momentum factor, which controls the influence of previous gradients on the current update. Typically a value between 0.0 and 1.0, where a value closer to 1 means more influence from previous gradients.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The learning rate and momentum factor should be chosen based on the specific task and model being trained.</li>
<li>The optimizer assumes that the model parameters are represented as <code>Node</code> objects and that these nodes will have gradients available when the <code>step</code> method is called.</li>
</ul>
</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Mgepahmge (<a href="https://github.com/Mgepahmge">https://github.com/Mgepahmge</a>)</dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024/12/07 </dd></dl>

<p class="definition">Definition at line <a class="el" href="_optimizer_8cu_source.html#l00021">21</a> of file <a class="el" href="_optimizer_8cu_source.html">Optimizer.cu</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a9b8d15dc85293840cbd19e27a6bb52a6" name="a9b8d15dc85293840cbd19e27a6bb52a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b8d15dc85293840cbd19e27a6bb52a6">&#9670;&#160;</a></span>step()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void nz::opt::Momentum::step </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classnz_1_1nodes_1_1_node.html">Node</a> *</td>          <td class="paramname"><span class="paramname"><em>input</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Performs a single optimization step using the <a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a> algorithm. </p>
<p>The <code>step</code> function updates the model parameters represented by the <code>Node</code> object using the <a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a> optimization algorithm. It incorporates both the current gradients and the previous velocity term to update the model parameters. The momentum term helps accelerate the convergence of the optimizer by smoothing out updates and reducing oscillations.</p>
<p>This method performs the following steps:</p><ul>
<li>Initializes the velocity vector for the <code>Node</code> if it is not already available. The velocity vector stores the running average of past gradients, scaled by the momentum factor.</li>
<li>Allocates memory for temporary variables on the GPU and computes the velocity update using a CUDA kernel.</li>
<li>Updates the velocity vector and the model parameters by applying the momentum update and gradient descent.</li>
<li>Frees the temporary GPU memory after the update is complete.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">input</td><td>A pointer to the <code>Node</code> object representing the model parameters. This object should have gradients stored in its <code>output</code> attribute, which will be used to update the parameters.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The <code>Node</code> object is assumed to have a valid <code>output</code> tensor with its gradients already computed.</li>
<li>The velocity map stores the velocity for each <code>Node</code> to ensure the momentum is correctly applied per parameter.</li>
<li>The method leverages CUDA to perform parallel computations for efficiency during the optimization process.</li>
<li>The optimizer uses the momentum factor (<code>beta</code>) to control the influence of past gradients on the current update.</li>
</ul>
</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnz_1_1opt_1_1_momentum.html" title="Momentum optimizer for deep learning models.">Momentum</a> for the class definition and constructor.</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Mgepahmge (<a href="https://github.com/Mgepahmge">https://github.com/Mgepahmge</a>)</dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024/12/07 </dd></dl>

<p>Implements <a class="el" href="classnz_1_1opt_1_1_optimizer.html#a826381abaaf29dbebade7cfd38b266e4">nz::opt::Optimizer</a>.</p>

<p class="definition">Definition at line <a class="el" href="_optimizer_8cu_source.html#l00026">26</a> of file <a class="el" href="_optimizer_8cu_source.html">Optimizer.cu</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classnz_1_1opt_1_1_momentum_a9b8d15dc85293840cbd19e27a6bb52a6_cgraph.png" border="0" usemap="#aclassnz_1_1opt_1_1_momentum_a9b8d15dc85293840cbd19e27a6bb52a6_cgraph" alt=""/></div>
<map name="aclassnz_1_1opt_1_1_momentum_a9b8d15dc85293840cbd19e27a6bb52a6_cgraph" id="aclassnz_1_1opt_1_1_momentum_a9b8d15dc85293840cbd19e27a6bb52a6_cgraph">
<area shape="rect" title="Performs a single optimization step using the Momentum algorithm." alt="" coords="5,181,173,208"/>
<area shape="rect" href="classnz_1_1data_1_1_tensor.html#ad220de56b18c404611f07f2290cd7e9d" title="Fills the tensor&#39;s data with a specified value." alt="" coords="245,236,382,263"/>
<area shape="poly" title=" " alt="" coords="147,206,242,229,240,234,146,211"/>
<area shape="rect" href="classnz_1_1cu_strm_1_1_stream_manager.html#ab4b2eb422e0e1ee44bdfdc0eb94457ce" title="Returns a reference to the singleton instance of the StreamManager." alt="" coords="687,115,873,157"/>
<area shape="poly" title=" " alt="" coords="120,178,167,160,220,143,336,115,428,101,521,100,640,108,672,112,672,117,639,113,521,105,428,107,337,120,221,148,169,165,122,183"/>
<area shape="rect" href="classnz_1_1cu_strm_1_1_stream_manager.html#a785cf34395067f425e032d9bd5e1fa20" title="Frees the CUDA device memory pointed to by the given pointer." alt="" coords="221,341,406,384"/>
<area shape="poly" title=" " alt="" coords="103,206,152,260,185,292,222,320,241,332,238,336,219,325,182,296,148,264,99,210"/>
<area shape="rect" href="classnz_1_1cu_strm_1_1_stream_manager.html#a97f78a2d43f6e0508c82d4f3b629de96" title="Asynchronously allocates device memory for type&#45;specific data with stream&#45;ordered dependency tracking..." alt="" coords="221,5,406,48"/>
<area shape="poly" title=" " alt="" coords="99,179,148,125,182,93,219,64,238,53,241,58,222,69,185,97,152,129,103,183"/>
<area shape="rect" href="classnz_1_1cu_strm_1_1_stream_manager.html#afa38d5c6db0e6b48c8f74ce8ad0df2bc" title="Asynchronously copies data between CUDA device and host memory based on the specified memory copy kin..." alt="" coords="687,248,873,291"/>
<area shape="poly" title=" " alt="" coords="108,206,156,241,188,259,221,272,280,286,340,295,461,302,575,297,672,286,672,291,575,302,461,307,339,300,279,291,220,277,186,264,154,246,105,211"/>
<area shape="rect" href="namespacenz_1_1krnl.html#a273ef3023442a864f1028becaf236bae" title="Kernel function to apply Momentum optimization." alt="" coords="478,123,615,149"/>
<area shape="poly" title=" " alt="" coords="173,180,220,173,462,143,463,148,221,179,173,185"/>
<area shape="rect" href="namespacenz_1_1krnl.html#aeec286d5351eee7061e151470adb4eef" title="Kernel function to perform Stochastic Gradient Descent (SGD) optimization." alt="" coords="455,173,638,216"/>
<area shape="poly" title=" " alt="" coords="173,192,439,192,439,197,173,197"/>
<area shape="rect" href="namespacenz_1_1krnl.html#ad136c8a6560a5305984ce0a31bea71bf" title="Kernel function to fill a data array with a given value." alt="" coords="502,240,591,267"/>
<area shape="poly" title=" " alt="" coords="382,248,487,250,487,255,382,253"/>
<area shape="poly" title=" " alt="" coords="591,244,615,237,638,226,653,212,661,198,670,183,686,167,692,163,695,167,689,171,674,186,666,200,657,215,641,230,617,242,592,249"/>
<area shape="rect" href="classnz_1_1cu_strm_1_1_stream_manager.html#a46ce59b45de432842454aadf00b93791" title="Asynchronously submits a CUDA kernel with stream&#45;ordered dependency management." alt="" coords="687,181,873,224"/>
<area shape="poly" title=" " alt="" coords="591,241,671,223,673,229,593,246"/>
<area shape="rect" href="classnz_1_1cu_strm_1_1_stream_manager.html#a1de1cf3aadea137faf90a2f9b4b7abe2" title="Acquires CUDA stream from pool using round&#45;robin scheduling." alt="" coords="921,181,1106,224"/>
<area shape="poly" title=" " alt="" coords="873,200,905,200,905,205,873,205"/>
<area shape="rect" href="classnz_1_1cu_strm_1_1_stream_manager.html#adb1078a67c6e38932d7d58c2adb05ec0" title="Synchronizes CUDA stream execution until data writes complete." alt="" coords="921,248,1106,291"/>
<area shape="poly" title=" " alt="" coords="858,222,922,241,921,246,856,227"/>
<area shape="rect" href="classnz_1_1cu_strm_1_1_stream_manager.html#abe439fa00c0bd369c0b2345b095ed5af" title="Synchronizes host thread with completion events for a specific data object." alt="" coords="454,341,639,384"/>
<area shape="poly" title=" " alt="" coords="406,360,438,360,438,365,406,365"/>
<area shape="poly" title=" " alt="" coords="407,23,506,27,624,39,751,62,813,79,874,100,932,132,980,169,977,173,929,136,872,105,812,84,750,67,623,44,505,33,406,28"/>
<area shape="poly" title=" " alt="" coords="856,245,921,226,922,231,858,250"/>
<area shape="poly" title=" " alt="" coords="873,267,905,267,905,272,873,272"/>
<area shape="poly" title=" " alt="" coords="616,133,672,133,672,139,616,139"/>
<area shape="poly" title=" " alt="" coords="599,147,640,159,692,174,691,179,639,164,598,152"/>
<area shape="poly" title=" " alt="" coords="633,170,677,159,678,164,635,175"/>
<area shape="poly" title=" " alt="" coords="639,195,672,196,672,202,638,200"/>
</map>
</div>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Users/Mgepahmge/Documents/C Program/NeuZephyr/include/NeuZephyr/<a class="el" href="_optimizer_8cuh_source.html">Optimizer.cuh</a></li>
<li>D:/Users/Mgepahmge/Documents/C Program/NeuZephyr/src/<a class="el" href="_optimizer_8cu_source.html">Optimizer.cu</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
